package org.yawnage.framework.server 
{
	import org.yawnage.base.BaseClass;
	import org.yawnage.framework.Broker;
	import org.yawnage.interfaces.framework.IPublisher;
	import org.yawnage.interfaces.framework.IServiceLayer;
	 /**
	  * <p>//TODO:To be written</p>
	  * @author Berry Jordaan
	  * @date 2011/09/06 12:05 PM
	  * @copyright  Copyright © Berry/James 2011
	  * @version 1.0.0.0
	  * @filename Broker.as 
	  * @description
	  * @history Berry Jordaan on 2011/09/06 12:05 PM: Created
	  */
	public class ServiceLayer extends BaseClass implements IServiceLayer
	{		
		//************** Enums **************

		//************** Public *************
		
		//************** Private ************
		private var _publisherP		:IPublisher;
		private var serviceNameP	:String;
		private var _publisherService:*;
		private var _internalID		:Number;
		
		//************** protected **********
		
		/**
		 * Constructor
		 */
		public function ServiceLayer(publisherP:IPublisher, serviceNameP:String)
		{
			super();
			setClassDescription("org.yawnage.framework.server.ServiceLayer");
			this.serviceNameP = serviceNameP;
			_publisherP = publisherP;
			_internalID = Broker.internalID;
		}
		
		/**
		 * useless comment here!
		 */
		override public function dispose():void 
		{
			super.dispose();
		}
		
		/* INTERFACE org.yawnage.base.interfaces.framework.IServiceLayer */
		
		public function get publisherService():* 
		{
			return _publisherService;
		}
		
		public function get internalID():Number 
		{
			return _internalID;
		}
		
		public function get key():String 
		{
			return serviceNameP;
		}
		
		public function get publisher():IPublisher 
		{
			return _publisherP;
		}
		
	}
}